source("https://gitee.com/ry2an/my_public_functions_r/raw/master/create_0_row_df.R")
create_fake_data <- function(centers = matrix(), 
                             type_name = paste("p", 1:dim(centers)[1], 
                                               sep = "")){
  point_num <- dim(centers)[1]
  point_dig <- dim(centers)[2]/2 - 0.5
    fin_df <- create_0_row_df(name_vec = c(paste("v", 1:point_dig, sep = ""), 
                                         "point_name"))
  for(i in 1:point_num){
    point_num_lo <- centers[i, 1]
    temp_ma <- matrix(rep(0, point_num_lo * point_dig), ncol = point_dig)
    for(j in 1:point_dig){
      temp_ma[,j] <- rnorm(n = point_num_lo, 
                           mean = centers[i, j + 1], 
                           sd = centers[i, j + 1 + point_dig])
    }
    temp_df <- as.data.frame(temp_ma)
    temp_df$point_name <- rep(type_name[i], point_num_lo)
    names(temp_df) <- c(paste("v", 1:point_dig, sep = ""), 
                        "point_name")
    fin_df <- rbind(fin_df, temp_df)
    # cat(dim(fin_df), "\n")
  }
  return(fin_df)
}

centers <- matrix(c(
  100, 5,3,0.8,2,
  50, 10,2,5,7,
  70, 6,5,7,2
), nrow = 3, byrow = T)

fake_data <- create_fake_data(centers = centers)
ggplot(fake_data, aes(x = v1, y = v2, color = point_name)) + geom_point()